Skip to content

feat: promote npm edge tag to latest when prerelease is promoted#126

Merged
AaronFeledy merged 1 commit intomainfrom
feature/promote-edge-on-edit
Feb 20, 2026
Merged

feat: promote npm edge tag to latest when prerelease is promoted#126
AaronFeledy merged 1 commit intomainfrom
feature/promote-edge-on-edit

Conversation

@AaronFeledy
Copy link
Copy Markdown
Member

@AaronFeledy AaronFeledy commented Feb 20, 2026

Problem

When a release is published as a prerelease, it gets tagged as edge on npm. Later, when the release is promoted to a full release in GitHub, the npm latest tag doesn't update because the workflow only triggered on published.

Solution

  • Added released to the release workflow trigger types
  • New lightweight promote job that only runs npm dist-tag add latest — no install, no lint, no tests, no re-publish
  • Only fires on the released event (when a prerelease is promoted to full release)
  • Existing deploy job is now explicitly gated to published events only (no behavior change)
  • Uses TAG_NAME env var instead of direct interpolation to prevent script injection

Flow

  1. Publish as prerelease → full pipeline runs, publishes with edge tag (unchanged)
  2. Promote release → uncheck prerelease → promote job runs, points latest to that version (~15s)

The dist-tag add command is idempotent, so if both published and released fire on a fresh non-prerelease publish, the redundant promote is harmless.


Note

Low Risk
CI-only change affecting release automation; main risk is incorrect npm dist-tag updates if the release tag/version parsing or permissions are misconfigured.

Overview
Updates the NPM release GitHub Actions workflow to also trigger on release.released events.

Adds a lightweight promote job that runs only on released to retag the released version from edge to npm latest via npm dist-tag add, and gates the existing deploy pipeline to run only on published events.

Written by Cursor Bugbot for commit 25b439f. This will update automatically on new commits. Configure here.

Adds a 'released' trigger to the release workflow with a lightweight 'promote' job that runs npm dist-tag to move 'latest' to the current version when a prerelease is promoted to a full release. The existing publish pipeline remains gated to 'published' events only.
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 20, 2026

Deploy Preview for lando-wordpress ready!

Name Link
🔨 Latest commit 25b439f
🔍 Latest deploy log https://app.netlify.com/projects/lando-wordpress/deploys/6997dcb8009840000863d7ad
😎 Deploy Preview https://deploy-preview-126--lando-wordpress.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 84 (🔴 down 6 from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@AaronFeledy AaronFeledy merged commit 0fef06e into main Feb 20, 2026
32 checks passed
@AaronFeledy AaronFeledy deleted the feature/promote-edge-on-edit branch February 20, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant